<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>正则表达式</title>
</head>
<body>
<script>
    //  过滤川农学生邮箱    学号@stu.sicau.edu.cn
    var reg = new RegExp(/^[a-zA-Z0-9]{5,}(@)[a-z]{1,}[a-z]{1,}(.)[a-z]{1,}(.edu.cn)$/);
    document.write(reg.test(prompt("请输入川农学生邮箱")));
</script>
</body>
</html>